raar.engine
Class RAEngine_Simulator

java.lang.Object
  extended by raar.engine.RAEngine_Simulator
All Implemented Interfaces:
RAPulseObserver

public class RAEngine_Simulator
extends java.lang.Object
implements RAPulseObserver

Simulation control and executor system.


Field Summary
static double MIN_TIME
           
 
Constructor Summary
RAEngine_Simulator(RAWorld world, long currentRound)
          Construct with a world and a round to start from.
RAEngine_Simulator(RAWorld world, long n_runs, long currentRound)
          Construct with a world and a round to start from.
 
Method Summary
 void end()
          End.
 RAWorld getWorld()
          Return the world we're simulating.
 void pause()
          Pause.
 boolean pulse()
          Run one round.
 void rewind()
          Rewind.
 boolean running()
          Are we running?
 void setOwner(RAEngineObserver owner)
          Set owner.
 void start()
          Start.
 boolean tryResetAgent(RAAgent a)
          Attempt a reset for the agent a.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_TIME

public static double MIN_TIME
Constructor Detail

RAEngine_Simulator

public RAEngine_Simulator(RAWorld world,
                          long currentRound)
Construct with a world and a round to start from.


RAEngine_Simulator

public RAEngine_Simulator(RAWorld world,
                          long n_runs,
                          long currentRound)
Construct with a world and a round to start from. Run n_runs.

Method Detail

getWorld

public RAWorld getWorld()
Return the world we're simulating.


setOwner

public void setOwner(RAEngineObserver owner)
Set owner.


start

public void start()
Start.


pulse

public boolean pulse()
Run one round.

Specified by:
pulse in interface RAPulseObserver

end

public void end()
End.

Specified by:
end in interface RAPulseObserver

pause

public void pause()
Pause.


rewind

public void rewind()
            throws RAException
Rewind.

Throws:
RAException

tryResetAgent

public boolean tryResetAgent(RAAgent a)
Attempt a reset for the agent a.


running

public boolean running()
Are we running?